import axios, { InternalAxiosRequestConfig, AxiosResponse } from 'axios'

const token = '828fc66589b5aeb359afed05fb864333'
const baseURL = 'https://gitee.com/'
const userName = 'yanghao'
const service = axios.create({
	baseURL,
	timeout: 50000,
	headers: {
		Authorization: `token ${token}`,
		'Content-Type': 'application/json',
		'Access-Control-Allow-Origin': '*',
		'User-Agent':
			'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36' // 替换为你的用户代理
	}
})

export const getGitList = async () => {
	const url = '/api/v4/users/13/projects'
	return service.get(url)
}
